using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace LF.Domain.Services
{
    /// <summary>
    /// 文本向量嵌入服务接口
    /// </summary>
    public interface ITextEmbeddingService : IDomainService
    {
        /// <summary>
        /// 获取单个文本的向量嵌入
        /// </summary>
        /// <param name="text">文本内容</param>
        /// <returns>向量嵌入（浮点数组）</returns>
        Task<float[]> GetEmbeddingAsync(string text);
        
        /// <summary>
        /// 批量获取文本的向量嵌入
        /// </summary>
        /// <param name="texts">文本内容列表</param>
        /// <returns>向量嵌入列表</returns>
        Task<List<float[]>> GetEmbeddingsAsync(List<string> texts);
        
        /// <summary>
        /// 计算两个向量之间的余弦相似度
        /// </summary>
        /// <param name="embedding1">向量1</param>
        /// <param name="embedding2">向量2</param>
        /// <returns>相似度（0-1之间的值，越大表示越相似）</returns>
        double CalculateSimilarity(float[] embedding1, float[] embedding2);
    }
} 